Markdown
A showcase of all Markdown features supported in Trilium's Markdown note type.
1. Basic Formatting (Standard Markdown)
Bold text, italic text, strikethrough,
and inline code.
A simple blockquote demonstrating standard Markdown.
2. GitHub-Flavored Markdown (GFM)
Tables
| Feature | Supported | Notes |
|---|---|---|
| Standard Markdown | ✅ | Full support |
| GFM Tables | ✅ | Like this one |
| Math Equations | ✅ | Via KaTeX |
| Mermaid Diagrams | ✅ | Via ```mermaid blocks |
| Admonitions | ✅ | GitHub-style |
Task Lists
3. Code Blocks with Syntax Highlighting
Note: The language must be specified for syntax highlighting to apply.
Sample with no syntax highlighting:
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet("Trilium"));
JavaScript with syntax highlighting:
// JavaScript example
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet("Trilium"));
Python example:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(10))
SQL example:
SELECT title, dateCreated
FROM notes
WHERE type = 'markdown'
ORDER BY dateCreated DESC;
4. Block Quotes & Admonitions
A standard Markdown blockquote. It can span multiple lines.
5. Math Equations
Inline math: \(E = mc^2\)
Block math:
\[\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}\] \[\Gamma(n) = (n-1)! \quad \forall n \in \mathbb{N}\]6. Mermaid Diagrams
graph TD
A[Start] --> B{Is it a Markdown note?}
B -- Yes --> C[Render preview]
B -- No --> D[Use Text note]
C --> E[Enjoy split view!]sequenceDiagram
participant User
participant Trilium
User->>Trilium: Opens Markdown note
Trilium->>User: Shows split view (source + preview)
User->>Trilium: Edits source
Trilium->>User: Syncs scroll & highlights block
7. Internal (Reference) Links — Wikilinks Format
Link to a note by its Note ID using the Wikilinks-like format:
Or using HTML syntax for more control:
8. Include Note (HTML Syntax)
Included notes using HTML syntax.
9. Nested Syntax Highlighting (Code Inside Code Blocks)
Trilium's source pane supports nested syntax highlighting — for example, highlighting HTML inside a Markdown code fence:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Trilium</title>
</head>
<body>
<h1>Hello from HTML inside Markdown!</h1>
</body>
</html>
10. Lists
Unordered
- Item one
- Nested item A
- Nested item B
- Deeply nested
- Item two
- Item three
Ordered
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
11. Horizontal Rules & Misc
Horizontal rule:
Superscript: X^2^
Subscript: H2O
Footnote reference1
Footnotes
- This is the footnote content. ↩